-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow multiple countries with same country code #2586
Allow multiple countries with same country code #2586
Conversation
🦋 Changeset detectedLatest commit: 5592dc4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This comment was marked as resolved.
This comment was marked as resolved.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2586 +/- ##
==========================================
- Coverage 86.76% 86.75% -0.01%
==========================================
Files 210 210
Lines 12056 12065 +9
Branches 1520 1524 +4
==========================================
+ Hits 10460 10467 +7
- Misses 1543 1545 +2
Partials 53 53
|
…r-to-handle-mutliple-countries-with-same-code-and-styling
15eb87d
to
ba02bb2
Compare
…untries-with-same-code-and-styling
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked whether there are any countries with multiple phone codes. There doesn't seem to be any, so it appears to be a many-to-one relationship between phone code and country code. In that case, it makes total sense to use the country code as the input value. Thanks for the pull request! 🙌🏻
packages/circuit-ui/components/PhoneNumberInput/PhoneNumberInput.tsx
Outdated
Show resolved
Hide resolved
packages/circuit-ui/components/PhoneNumberInput/PhoneNumberInput.tsx
Outdated
Show resolved
Hide resolved
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Add a comment explaining why the pull request is still relevant to prevent it from being closed. |
@roma-claudio Do you want to address the review comments yourself, or would you mind if we take over the PR to finish it? |
@connor-baer - I'm planning to work on it this Friday. If you have a urgent deadline to be met before that I'm happy with somebody else taking it over (as I don't have capacity before) |
…ut.tsx Co-authored-by: Connor Bär <[email protected]>
…ut.tsx Co-authored-by: Connor Bär <[email protected]>
@connor-baer - I've accepted the suggested changes 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for the contribution, @roma-claudio! I've added a changeset which means this is good to go.
…untries-with-same-code-and-styling
Addresses SX-2130.
Purpose
We are currently using the country code phone prefix (e.g.
+49
) as unique identifier of the country code select/input field.However, the phone prefix is not unique given a list of countries (e.g. Canada and U.S. share the same country code:
+1
)This PR is changing the value that is hold by the country code input/select field from the phone prefix to the country ISO code (e.g.
US
)Approach and changes
Adapted the service and the component logic to consider the country code and not the phone prefix as the source of truth for the country code input/select field
Definition of done